import requets from "@/services";
import type { IaccountType } from "@/views/Login/types"

// 登录API
export const getLoginAPI = (account: IaccountType) => {
  return requets.post({
    url: "/login",
    data: account
  })
}

// 查询用户详情
export const getuserAPI = (id: number): Promise<any> => {
  return requets.get({
    url: `/users/${id}`,
  })
}

//查询用户菜单
export const getRoleMenusByIdAPI = (id: number): Promise<any> => {
  return requets.get({
    url: `/role/${id}/menu`
  })
}
